package com.geekaca.web.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

@WebServlet(urlPatterns = "/jstlTest")
public class JSTLServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("jstlTest Service...");
        req.setAttribute("status", 1);
        req.getRequestDispatcher("/JSTL.jsp").forward(req, resp);
        HttpSession session = req.getSession();
        session.setAttribute("status",0);

    }
}
